<%@ page contentType="text/html;charset=UTF-8" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<c:set var="ctx" value="${pageContext.request.contextPath}"/>
<%@ taglib prefix="shiro" uri="http://shiro.apache.org/tags" %>
<html>
<head lang="en">
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, user-scalable=no,
    initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
    <link rel="stylesheet" href="${ctx}/static/h5/css/public/bootstrap.min.css" type="text/css">
    <link rel="stylesheet" href="${ctx}/static/h5/css/personal/index.css" type="text/css">
    <title>发现</title>
</head>
<body id="ancestor">
<header>
    <h4>发现</h4>

    <!--<div class="header-img dropdown">-->
        <!--<a href="html/seacher.html"><img src="${ctx}/static/h5/images/seacher.png" alt=""/></a>-->
        <!--<img src="${ctx}/static/h5/images/add.png" class="dropdown-toggle" id="dropdownMenu" data-toggle="dropdown" alt=""/>-->
        <!--<ul class="dropdown-menu" role="menu" aria-labelledby="dropdownMenu1">-->
            <!--<li role="presentation">-->
                <!--<a role="menuitem" tabindex="-1" href="#">-->
                    <!--<img src="${ctx}/static/h5/images/add-friend.png" alt=""/>添加朋友-->
                <!--</a>-->
            <!--</li>-->
            <!--<li role="presentation">-->
                <!--<a role="menuitem" tabindex="-1" href="#">-->
                    <!--<img src="${ctx}/static/h5/images/saoyisao.png" alt=""/>扫一扫-->
                <!--</a>-->
            <!--</li>-->
        <!--</ul>-->
    <!--</div>-->
</header>
<!--发现-->
<section class="tab-content">
    <div id="find" class="tab-pane fade in active">
        <ul>
            <li><a href="">
                <div id="enter-family">${familyCount}</div>
                <span>入驻家族</span></a>
            </li>
            <li><a href="">
                <div id="number-of-people">${personCount}</div>
                <span>家族总人数</span></a>
            </li>
            <li><a href="">
                <div id="newly-increased">${yester}</div>
                <span>昨日新增</span></a>
            </li>
        </ul>
        <div class="cloudFamily-news">
            <img src="${ctx}/static/h5/images/news.png" alt=""/>
            <a href="/h5/news/getNewsAll">云谱头条</a>
        </div>
        <div class="family">
            <img src="${ctx}/static/h5/images/join-family.png" alt=""/>
            <a href="/h5/find/joinlist" class="joinlist">家族列表</a>
        </div>
    </div>
</section>
<footer class="footer">
    <ul class="nav nav-pills">
        <li>
            <a href="/h5/index/home" class="mesager">消息</a>
        </li>
        <li>
            <a href="/h5/family/" class="family">家族</a>
        </li>
        <li class="active">
            <a href="/h5/find/" class="find">发现</a>
        </li>
        <li>
            <a href="/h5/user/mzone" class="myself">我的</a>
        </li>
    </ul>
</footer>
<div ng-include="'include/main_footer.html'"></div>
</body>
<script src="${ctx}/static/h5/js/public/jquery-2.2.3.min.js"></script>
<script src="${ctx}/static/h5/js/public/bootstrap.min.js"></script>
<script src="${ctx}/static/h5/js/personal/index.js"></script>
<script src="${ctx}/static/h5/js/personal/find.js"></script>
<script>
    $(function () {
        var userId=localStorage.getItem("userId");
        $(".mesager").on("click",function () {
            var url="";
            if(userId == "" || userId == null){
                url="/h5/user/login";
            }else {
                url = "/h5/index/home?userId=" + userId
            }
            $(this).attr("href",url);
        })
        $(".family").on("click",function () {
            var url="";
            if(userId == "" || userId == null){
                url="/h5/user/login";
            }else {
                url="/h5/family/family?userId="+userId
            }
            $(this).attr("href",url);
        })

        $(".myself").on("click",function () {
            var url="";
            if(userId == "" || userId == null){
                url="/h5/user/login";
            }else {
                url = "/h5/user/mzone?userId=" + userId
            }
            $(this).attr("href",url);
        })
        $(".joinlist").on("click",function () {
            if(userId == "" || userId == null){
                userId="0";
            }
            var url="/h5/find/joinlist?userId="+userId
            $(this).attr("href",url);
        })
        if(userId==1){

        }
    })
</script>
</html>